import os


class Config(object):
    DEBUG = False
    TESTING = False
    # set max content length to limit the uploaded file size to less than 128mb
    MAX_CONTENT_LENGTH = 128 * 1024 * 1024
    DOCKER_URL = None


class ProductionConfig(Config):
    MONGODB_SETTINGS = {
        'host': 'mongodb-service-deploy',
        'port': 27017,
        'db': 'deployment',
        'username': os.environ.get('MONGO_USERNAME'),
        'password': os.environ.get('MONGO_PASSWORD'),
        'connect': False
    }


class DevelopmentConfig(Config):
    DEBUG = True
    MONGODB_SETTINGS = {
        'host': '175.24.138.88',
        'port': 27017,
        'db': 'industry',
        'username': 'industry',
        'password': 'Industry_',
        'connect': False,
    }
    DOCKER_URL = 'tcp://175.24.138.88:12580'


production = os.environ.get('PRODUCTION')
config_object = ProductionConfig() if production else DevelopmentConfig()
